---
label: gulpfile
id: build-tasks-gulpfile 
categorySlug: gulp
categoryLabel: Gulp
categoryRank: 2

# gulpfile.js

Thx to [gulp-load-plugins][gulp-load-plugins], gulp with automatically
find gulp packages installed and put it in ``this.opts.plugins``.

[gulp-task-loader][gulp-task-loader] will load any task in ``./tasks``.

To build assets once: ``gulp build``.

To start a server, you need first to watch for assets to build with:

``
$ gulp watch
``

Then on another terminal, launch the server: ``$ gulp server``

Build documentation: ``$ gulp doc``. 

Build for production: ``$ gulp prod`` will build into ``./prod``.

Note that doc will be built each time ``gulp server`` is invoked.

[gulp-load-plugins]: https://github.com/jackfranklin/gulp-load-plugins
[gulp-task-loader]: https://github.com/hontas/gulp-task-loader

---
